<?php
header('content-type:text/html;charset=utf-8');
try {
	$pdo=new PDO('mysql:host=localhost; dbname=exercise','root','root');
	/*$sql= 'update user set username="Tom0" where id=1';*/
	$sql = 'delete from user where id = 3';
	$res = $pdo->exec($sql);
	echo $res."条记录被影响。";
	echo "<hr>";
	var_dump($res);
} catch(PDOException $e) {
	echo $e->getMessage();
}
?>